package com.sharp.core.raytrace;

import com.sharp.core.graphics.Light;
import com.sharp.core.math.primitives.Object3D;

public abstract class ObjectHolder<T extends Object3D> {

	private float ambientCoefficient;
	
	public abstract void addObject(T p);
	public abstract void addLight(Light p);
	public abstract Intersection findIntersection(Ray r);
	public abstract boolean isVisible(Intersection from, Light l);
	public abstract boolean isIntersected(Ray ray);
	public abstract Iterable<Light> getLights();
	
	public float getAmbientCoefficient() {
		return ambientCoefficient;
	}
	public void setAmbientCoefficient(float ambientCoefficient) {
		this.ambientCoefficient = ambientCoefficient;
	}
	
	public void addObject(T p, float x, float y, float z) {
		p.setPos(x, y, z);
		addObject(p);
	}

	
}
